package edu.drexel.jrexel2d.demo;

import org.lwjgl.input.Keyboard;

import edu.drexel.jrexel2d.jrexel2d_client;
import edu.drexel.jrexel2d.input.CharacterActions;
import edu.drexel.jrexel2d.input.GameAction;
import edu.drexel.jrexel2d.input.InputMap;

public class demo_client {

	static InputMap inputMap;
	static int playerId = 1;

	public static void main(String[] args) {
		inputMap = createInputMap();
		jrexel2d_client game = new jrexel2d_client(inputMap, false, playerId);

		game.start();

	}

	private static InputMap createInputMap() {
		inputMap = new InputMap();
		
		inputMap.addToKeyboardMap(Keyboard.KEY_W, new GameAction(playerId,
				CharacterActions.MOVE_UP));
		inputMap.addToKeyboardMap(Keyboard.KEY_A, new GameAction(playerId,
				CharacterActions.MOVE_LEFT));
		inputMap.addToKeyboardMap(Keyboard.KEY_S, new GameAction(playerId,
				CharacterActions.MOVE_DOWN));
		inputMap.addToKeyboardMap(Keyboard.KEY_D, new GameAction(playerId,
				CharacterActions.MOVE_RIGHT));
		inputMap.addToKeyboardMap(Keyboard.KEY_J, new GameAction(playerId,
				CharacterActions.JUMP));
		inputMap.addToKeyboardMap(Keyboard.KEY_P,  new GameAction(playerId,
				CharacterActions.PICK_UP));
		inputMap.addToKeyboardMap(Keyboard.KEY_T,  new GameAction(playerId,
				CharacterActions.THROW));
		inputMap.addToKeyboardMap(Keyboard.KEY_R,  new GameAction(playerId,
				CharacterActions.ROLL));
		
		return inputMap;
	}

}
